package com.app.web.base.vo;

import java.io.Serializable;

import com.app.web.base.model.IdModel;
import com.app.web.base.model.User;
import com.app.web.base.model.UserResource;
import com.app.web.base.util.Permission;

public class UserResourceVO extends IdModel implements Serializable {

	private static final long serialVersionUID = 1L;
	private User user;
	private Permission permission;

	public UserResourceVO() {
	}

	public UserResourceVO(UserResource userResource) {
		this.user = userResource.getUser();
		this.setId(user.getId());
		this.permission = new Permission(userResource.getPermission());
	}

	public UserResourceVO(User user, Permission permission) {
		this.user = user;
		this.setId(user.getId());
		this.permission = permission;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Permission getPermission() {
		return permission;
	}

	public void setPermission(Permission permission) {
		this.permission = permission;
	}

}
